home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
text
/
edit
/
BlacksEditor.lha
/
BlacksEditor
/
Rexx
/
CommentBlk.bed
< prev
next >
Wrap
Text File
|
1997-12-03
|
1KB
|
65 lines
/*
** $VER: CommentBlk.bed 1.01 (01.04.96)
**
** Comment out the selected block using ARexx comments
** (easily changed to C, Modula-2, Ada, or ASM comments)
**
** Written by Chris Bailey
** Modified by Martin Taillefer
** Modified by Marco Negri
** Modified by Brian Jones
*/
OPTIONS RESULTS
/* For ARexx commenting */
CommentStart = "/** "
CommentMid = "**** "
CommentEnd = "**/ "
/*
/* For C commenting */
CommentStart = "// "
CommentMid = "// "
CommentEnd = "// "
/* For Modula-2 or Pascal commenting */
CommentStart = "(**** "
CommentMid = " **** "
CommentEnd = " ****)"
/* For Ada commenting */
CommentStart = "-- "
CommentMid = "-- "
CommentEnd = "-- "
/* For ASM commenting */
CommentStart = "** "
CommentMid = "** "
CommentEnd = "** "
*/
GetBlkDims
PARSE VAR RESULT mode . start . end
IF mode = OFF THEN DO
SetStatusBar "Error: No block marked!"
END; ELSE DO
MarkBlk
Move start 1
Text '"' || CommentStart || '\n"'
RecordMacro QUIET
MoveSOL
Text '"' || CommentMid || '"'
MoveDown
EndMacro
IF end-start > 0 THEN
PlayMacro end - start
MoveSOL
Text '"' || CommentEnd || '\n"'
END